package com.shen.provider.service.Impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.shen.apicommons.entity.Student;

import com.shen.provider.mapper.StudentMapper;
import com.shen.provider.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class StudentServiceImpl extends ServiceImpl<StudentMapper, Student> implements StudentService {

    @Autowired
    private StudentMapper studentMapper;
    @Override
    public int addStudent(Student student) {
        int i = studentMapper.insert(student);
        return i;
    }

    @Override
    public Student queryStudent(Integer id) {
        Student student = studentMapper.selectById(id);
        return student;
    }
}
